﻿import request from '/@/utils/request';
enum Api {
  AddBanji = '/api/banji/add',
  DeleteBanji = '/api/banji/delete',
  UpdateBanji = '/api/banji/update',
  PageBanji = '/api/banji/page',
  DetailBanji = '/api/banji/detail',
  GetTeacherBzrIdDropdown = '/api/banji/TeacherBzrIdDropdown',
  ImportPreviewBanji = '/api/banji/importPreview',
  ImportBanji = '/api/banji/import',
  BanjiJiDropdown = '/api/banji/BanjiJiDropdown',
}

// 增加班级
export const addBanji = (params?: any) =>
	request({
		url: Api.AddBanji,
		method: 'post',
		data: params,
	});

// 删除班级
export const deleteBanji = (params?: any) => 
	request({
			url: Api.DeleteBanji,
			method: 'post',
			data: params,
		});

// 编辑班级
export const updateBanji = (params?: any) => 
	request({
			url: Api.UpdateBanji,
			method: 'post',
			data: params,
		});

// 分页查询班级
export const pageBanji = (params?: any) => 
	request({
			url: Api.PageBanji,
			method: 'post',
			data: params,
		});

// 详情班级
export const detailBanji = (id: any) => 
	request({
			url: Api.DetailBanji,
			method: 'get',
			data: { id },
		});

export const getTeacherBzrIdDropdown = () =>
		request({
		url: Api.GetTeacherBzrIdDropdown,
		method: 'get'
		});

// 导入教师预览
export const importPreviewBanji = (fileId: any) => 
	request({
			url: Api.ImportPreviewBanji,
			method: 'get',
			data: { fileId },
		});

		// 导入教师
export const importBanji = (params?: any) => 
	//console.log(params);
	request({
			url: Api.ImportBanji,
			method: 'post',
			data: params,
		});

export const getBanjiJiDropdown = () =>
		request({
		url: Api.BanjiJiDropdown,
		method: 'get'
		});